package com.study.thirdpartyeventconsumer.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.study.thirdpartyeventconsumer.constant.MailType;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Table(name = "student")
@Data
public class Student {
    @Id
    @Column(name = "id")
    private String id;
    @Column(name = "name")
    private String name;
    private Integer age;
    private String address;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date birthday;
    @NotNull
    private MailType mailType;
}
